package com.smartcampusbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartcampusbackend.model.ClassCircle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ClassCircleMapper extends BaseMapper<ClassCircle> {
    
    // 根据班级ID搜索班级圈
    ClassCircle findByClassId(@Param("classId") String classId);
    
    // 获取用户创建的班级圈
    List<ClassCircle> findByCreatorId(@Param("creatorId") Integer creatorId);
    
    // 获取用户加入的班级圈
    List<ClassCircle> findUserJoinedCircles(@Param("userId") Integer userId);
    
    // 更新成员数量
    int updateMemberCount(@Param("classCircleId") Integer classCircleId, @Param("memberCount") Integer memberCount);
} 